//
//  UIViewController+block.m
//

#import "UIViewController+block.h"
#import <objc/runtime.h>

@implementation UIViewController (block)

static const char OptionBlock = '\0';
- (void)setOptionBlock:(ControllerOptionBlock)optionBlock{
    
    objc_setAssociatedObject(self, &OptionBlock,
    optionBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
}

- (ControllerOptionBlock)optionBlock{
    
    return objc_getAssociatedObject(self, &OptionBlock);
}

@end
